package com.lapian.designmode.bridge.SGG;

import com.lapian.designmode.bridge.SGG.brand.Vivo;
import com.lapian.designmode.bridge.SGG.brand.XiaoMi;
import com.lapian.designmode.bridge.SGG.phone.FoldedPhone;
import com.lapian.designmode.bridge.SGG.phone.SlidePhone;

/**
 * 创建日期：2022/7/14 14:03
 *
 * @author 唐门.西门吹雪
 * 类说明：
 */
public class BridgeTest {
    public static void main(String[] args) {
        //todo 五步
        XiaoMi xiaoMi = new XiaoMi();
        FoldedPhone upRightPhone = new FoldedPhone(xiaoMi);
        upRightPhone.open();
        upRightPhone.call();
        upRightPhone.close();
        System.out.println("-------------------------------------");
        //todo 五步
        Vivo vivo = new Vivo();
        FoldedPhone foldedPhone = new FoldedPhone(vivo);
        foldedPhone.open();
        foldedPhone.call();
        foldedPhone.close();
//        //todo 创建一个华为匹配，几步：五步
//        Huawei huawei = new Huawei();
//        FoldedPhone foldedPhone1 = new FoldedPhone(huawei);
//        foldedPhone1.open();
//        foldedPhone1.call();
//        foldedPhone1.close();
        //创建滑动手机:8步
        System.out.println("--------------创建滑动手机:8步--------------");
        SlidePhone slidePhone = new SlidePhone(xiaoMi);
        slidePhone.open();
        slidePhone.call();
        slidePhone.close();
        SlidePhone slidePhone2 = new SlidePhone(vivo);
        slidePhone2.open();
        slidePhone2.call();
        slidePhone2.close();
    }
}
